<?php
	/* Template Name: Webinar Category Page */ 
?>

<?php get_header() ?>

	<div id="container">
    
    	<?php include('breadcrumbs.php'); ?>
    
    	<?php get_sidebar() ?>
    
		<div id="content">

<?php the_post() ?>

			<div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
				<h2 class="entry-title"><?php the_title() ?></h2>
                <?php include ('socialbuttons.php'); ?>

				<?php
					$args=array(
								'cat' => 120,
								'showposts'=>999
							);
							$my_query = new WP_Query($args);
							if( $my_query->have_posts() ) { ?>
        						<? while ($my_query->have_posts()) : $my_query->the_post(); ?>
                                
					<div class="category-item">
						<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
						<div class="product-thumb" style="float: left; margin-right: 10px; margin-bottom: 10px;">
							<a href="<?php the_permalink(); ?>"><img src="http://i3.ytimg.com/vi/<?php echo get_post_meta($post->ID, 'YouTubeVideo', true) ?>/0.jpg" alt="<?php the_title(); ?>" width="150" height="auto" style="width: 150px; height: auto;" /></a>
						</div>
						<?php the_excerpt(); ?>
						<p><a href="<?php the_permalink(); ?>">View This Webinar</a></p>
						<div style="width: 660px; height: 1px; background-color: #cccccc; clear: both; margin-top: 10px; margin-bottom: 10px;"></div>
					</div>
                    
				<?php endwhile; ?>
                
                <?php } ?>

                
			</div><!-- .post -->
            
            <!-- INCLUDE END OF PAGE CTA BLOCK IF THE PAGE HAS A CTA URL -->
            <?php if ( get_post_meta($post->ID, 'ctaURL', true) ) { ?>
				<?php include 'inpagecta.php'; ?>
			<?php } ?>

		</div><!-- #content -->
	</div><!-- #container -->

<?php get_footer() ?>